body {
  margin: 0;
  padding: 0px;
  transition: 0.5s;
  overflow-y: scroll;
}


ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  text-decoration: none;
}

.sidebar {
  justify-content: space-between;
  top: 0;
  left: 0;
}

.menu {
  list-style-type: none;
  font-size: 16px;
  width: 200px;
  height: 100%;
  background-color: hsl(246, 5%, 41%);
  float: left;
}

.collapsed {
  /* 设置折叠时的宽度 */
  width: 40px;


}

.menu.collapsed .menu-item a {
  /* 隐藏菜单项中的文字 */
  visibility: hidden;
}

.menu.collapsed .menu-item i {
  /* 显示菜单项中的图标 */
  visibility: visible;
}

.menu-item {
  margin-top: 0;
  background-color: hsl(246, 5%, 41%);
  align-items: center;

}

.menu-item a {
  display: block;
  padding: 10px;
  color: #fff;

}

.menu-item a:focus {
  text-decoration: none;
  color: #fff;
}

.menu-item a:visited,
.menu-item a:hover {
  text-decoration: none;
  background-color: #906f6f;
  color: #fff;
}

.submenu {
  display: none;
  list-style-type: none;
  padding: 0;
  margin: 0;
  background-color: darkgray;

}


.submenu li {
  font-size: 14px;

}

.menu-item a span {
  float: right;
}

.rotate {
  /* 旋转180度  */
  transform: rotate(180deg);
  /* 平滑过渡效果  */
  transition: transform 0.3s;

}

i {
  display: inline-block;
  color: white;
  margin-right: 8px;
}